package model
{	
	public final class Cloth
	{
	   	// the type of the cloth: 'hat', 'pants', etc...    
	    private var _type:String;
	    private var _source:Class;
	    public var caption:String;
	    
	    public static const clothTypes:Array = ['belt', 'hat', 'pants', 'shoes', 'jacket', 'shirt'];
		
	    ////////////////////////////////////////////////
	    // Public methods
	    
	    /** Make a cloth */
		public function Cloth(t:String, s:String, c:String, database:Database) { 
			_type = t; 
			_source = database.embeddedImages[t][s];
			caption = c;
		}
		
		/** Get the type of the cloth */
		public function get type():String { return _type; }
		
		/** Get the id of the cloth */
		public function get source():Class { return _source; }
		
	}
}